﻿var fs = require('fs');
var zlib = require('zlib');

fs.createReadStream('zip.txt.gz')
  .pipe(zlib.createGzip())
  .pipe(fs.createWriteStream('dezip.txt'))

console.log("文件解压完成")







// console.log(__filename);
// console.log(__dirname);

// console.log(global);


function myFunction() {
	try {
		var x= 2
		if(x=="")			throw "值为空";
		if(isNaN(x))		throw "不是数字";
		if(x>10)			throw "值太大";
		if(x<5)				throw "值太小";
		if(x>=5&&x<=10)		throw "无";
	}
	catch(err) {
		var a="错误：" + err + "。";
		console.log(a)
	}
	
}


myFunction()






